package org.cn.leroy.controller;

import org.cn.leroy.entity.Menu;
import org.cn.leroy.service.MenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * Created by Leroy on 2016/11/27.
 */
@Controller
@RequestMapping("/menu")
public class MenuController {
    @Autowired
    MenuService service;

    @RequestMapping(value = "/get",method = RequestMethod.GET)
    @ResponseBody
    public List<Menu> getMenuInf(){
        List<Menu> result = service.getMenuInf();
        return result;
    }
}
